package com.fantasybaby.action;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.fantasybaby.common.bean.Account;
import com.fantasybaby.user.service.IAccountService;

@Controller
@RequestMapping("/account")
@Scope("prototype")
public class AccountAction {
	@Autowired
	private IAccountService accountMybatisService;
	@RequestMapping("/{id}/showAccount")
	public String showAccount(@PathVariable int id,HttpServletRequest request){
		Account account = accountMybatisService.loadAccount(id);
		request.setAttribute("account", account);
		return "index";
	}
	@RequestMapping("/{id}/showAccount1")
	public String showAccount1(@PathVariable int id,HttpServletRequest request){
		Account account = accountMybatisService.loadAccount(id);
		request.setAttribute("account", account);
		return "index";
	}

}
